home *** CD-ROM | disk | FTP | other *** search
/ Joystick Magazine 1996 May / cd joy 71No13.iso / pc / demos / eurosoc / source / library / cglerr.h < prev    next >
C/C++ Source or Header  |  1995-09-06  |  7KB  |  206 lines

  1. #ifndef __CGL_ERR__
  2. #define __CGL_ERR__
  3.  
  4.      /*********************************************************************
  5.      
  6.      cglerr.h
  7.      
  8.      Copyright (c) Creative Technology Ltd. 1994-1995. All Rights Reserved.
  9.      
  10.      THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY 
  11.      KIND,  EITHER EXPRESSED OR IMPLIED,  INCLUDING BUT NOT LIMITED TO THE 
  12.      IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR 
  13.      PURPOSE.
  14.      
  15.      *********************************************************************/
  16.  
  17. /*
  18.  * @@ SOURCE DOCUMENTATION
  19.  *
  20.  * TITLE    : cglerr.h
  21.  * 
  22.  * VERSION  : 0.01
  23.  *
  24.  * DATE     : 1 December 1994
  25.  *
  26.  * AUTHOR   : Philip Teo
  27.  *            Toh Chin Kok
  28.  *            Burak Alp
  29.  *
  30.  * BRIEF    : This file includes all the error code for function
  31.  *            calls.
  32.  *
  33.  * @@ LOG CHANGE
  34.  * DATE         VERSION   REV          DESCRIPTION
  35.  * 13 Feb 95     1.0      Philip Teo   First library version
  36.  * 11 Mar 95     1.1      Philip Teo   Second library version
  37.  */
  38.                                                                      
  39. enum {
  40.  
  41.  CGL_SUCCESS = 0,
  42.  
  43. /////////////////////////////////////
  44. // Hardware Related Error          //
  45. /////////////////////////////////////
  46.  
  47. CGL_PCI_BIOS32_NOT_FOUND,
  48. CGL_PCI_BIOS_NOT_PRESENT,
  49. CGL_CM_INIT_FAILED, 
  50. CGL_GIGI_NOT_FOUND,
  51. CGL_GIGI_NOT_INIT,                              /*5*/
  52. CGL_GIGI_GENERAL_FAILURE,
  53. CGL_INVALID_VENDOR_ID,
  54. CGL_INVALID_DEVICE_ID,
  55. CGL_INVALID_REVISION_ID,
  56. CGL_INVALID_CLASS_CODE,                        /*10*/
  57. CGL_SET_GIGI_CONTROL_SPACE_ADDR_FAILED, 
  58. CGL_SET_GIGI_LOCAL_BUFFER_0_ADDR_FAILED,    
  59. CGL_SET_GIGI_FRAME_BUFFER_0_ADDR_FAILED,     
  60. CGL_SET_GIGI_LOCAL_BUFFER_1_ADDR_FAILED,      
  61. CGL_SET_GIGI_FRAME_BUFFER_1_ADDR_FAILED,        /*15*/
  62. CGL_SET_GIGI_EXPANSION_ROM_ADDR_FAILED,
  63. CGL_SET_GIGI_COMMAND_REGISTER_FAILED,
  64. CGL_READ_GIGI_CONTROL_SPACE_ADDR_FAILED, 
  65. CGL_READ_GIGI_LOCAL_BUFFER_0_ADDR_FAILED,    
  66. CGL_READ_GIGI_FRAME_BUFFER_0_ADDR_FAILED,       /*20*/
  67. CGL_READ_GIGI_LOCAL_BUFFER_1_ADDR_FAILED,      
  68. CGL_READ_GIGI_FRAME_BUFFER_1_ADDR_FAILED,      
  69. CGL_READ_GIGI_COMMAND_REGISTER_FAILED,
  70. CGL_MAP_GIGI_CONTROL_SPACE_ADDR_FAILED, 
  71. CGL_MAP_LOCALBUFFER_FAILED,                     /*25*/
  72. CGL_MAP_FRAMEBUFFER_FAILED,     
  73. CGL_MAP_GIGI_EXPANSION_ROM_ADDR_FAILED,
  74. CGL_UNKNOWN_FB_SIZE,
  75. CGL_UNKNOWN_LB_SIZE,
  76. CGL_SCREEN_RESOLUTION_NOT_SUPPORTED,            /*30*/
  77. CGL_COLOR_RESOLUTION_NOT_SUPPORTED,
  78. CGL_UNKNOWN_RAMDAC_FOUND,
  79. CGL_MEMORY_ALLOCATION_FAILED,
  80. CGL_INSTALL_INTERRUPT_FAILED,
  81. CGL_INVALID_INTERRUPT_RETURN,                   /*35*/
  82. CGL_INVALID_ERROR_INTERRUPT_RETURN, 
  83. CGL_INITFILE_NOT_FOUND,
  84. CGL_INVALID_PAN_WIDTH,
  85.  
  86.  
  87. /////////////////
  88. // Reserved    //
  89. /////////////////
  90.  
  91. CGL_RESERVED                = 512,
  92.  
  93. /////////////////////////////////////
  94. // Library Related Error           //
  95. /////////////////////////////////////
  96. CGL_ERR_FAILURE             = 995,
  97. CGL_ERR_CDL_FAILURE         = 999,
  98.  
  99. CGL_UNUSED                  = 1000,
  100.  
  101. /////////////////////////////////////
  102. // Primitive Operation Management  //
  103. /////////////////////////////////////
  104.  
  105. // cglSendStream
  106.  
  107. CGL_ERR_STREAM_BEGIN_NULL,              // stream buffer pointer error
  108. CGL_ERR_STREAM_TEXTURE_NULL,            // error in Texture Vertex
  109. CGL_ERR_STREAM_VERTEX_NULL,             // error in Spatial Vertex
  110. CGL_ERR_STREAM_COLOR_NULL,              // error in Color Vertex
  111. CGL_ERR_STREAM_DEPTHCUE_NULL,           // error in DepthCue Vertex
  112. CGL_ERR_NOT_CONFIGURE_FOR_DEPTH,        // error in Screen Configuration
  113. CGL_ERR_NOT_CONFIGURE_FOR_STENCIL,      // error in Screen Configuration
  114. CGL_ERR_PROPERTYMASK_TEXTUREENV_NULL,   // error in TextureEnv Structure
  115. CGL_ERR_PROPERTYMASK_DEPTH,             // error in Depth Structure
  116. CGL_ERR_PROPERTYMASK_STENCIL,           // error in Stencil Structure
  117. CGL_ERR_PROPERTYMASK_BLEND,             // error in Blend Strcture
  118. CGL_ERR_STREAM_VERTICE_NO,              // error in No of Vertices
  119. CGL_ERR_OPERATION,                      // Invalid operation
  120.  
  121. CGL_ERR_STREAM_COPYFIX_NULL      = 1100, // null pointer for fix header
  122. CGL_ERR_STREAM_UPLOADFIX_NULL,           // null pointer for fix header
  123. CGL_ERR_STREAM_DOWNLOADFIX_NULL,          // null pointer for fix header
  124. CGL_ERR_UPLOAD_PRIMITIVE_NOT_SUPPORT,    // primitive not supported
  125. CGL_ERR_DOWNLOAD_PRIMITIVE_NOT_SUPPORT,  // primitive not supported
  126.  
  127. // cglPutPixel & cglGetPixel  (CGL_ERR_MUST_INIT_SCREEN)
  128.  
  129. // cglInitScreen
  130.  
  131. CGL_ERR_INIT_NOT_ENOUGH_MEMORY   = 1200, // Graph Memory insufficient
  132. CGL_ERR_INIT_NOT_ENOUGH_DRAM,            // DRAM insufficient
  133. CGL_ERR_INIT_NOT_ENOUGH_VRAM,            // VRAM insufficient
  134. CGL_ERR_SCREEN_MODE,                     // Invalid screen mode
  135. CGL_ERR_DEPTH_STENCIL_OPTION,            // Invalid configure option
  136. CGL_ERR_COLOR_FORMAT,                    // Invalid color format
  137. CGL_ERR_UNKNOWN_HARDWARE,                // Unable to init hardware
  138.  
  139. // cglSetLinePattern
  140.  
  141. CGL_ERR_SET_LINE_PATTERN          = 1300, // insufficient memory to
  142.                                           // save the line pattern
  143. // cglSetFillPattern
  144.  
  145. CGL_ERR_SET_FILL_PATTERN          = 1400, // insufficient memory to 
  146.                                           // save the fill pattern
  147. // cglSetStipplePattern
  148. CGL_ERR_NULL_STIPPLE_PATTERN      = 1500, // null pattern array
  149.  
  150. // cglSetDepthMode
  151.  
  152. CGL_ERR_NO_DEPTH_BUFFER           = 1500, // no depth buffer 
  153.  
  154. // cglSetStencilMode
  155.  
  156. CGL_ERR_NO_STENCIL_BUFFER         = 1600, // no stencil buffer
  157.  
  158. // cglSetTextureFilter
  159.  
  160. CGL_ERR_SET_TEXTURE_FILTER        = 1700, // error in filter selection
  161.  
  162. // cglLoadTextureMap  
  163.  
  164. CGL_ERR_TEXTURE_INVAID_HOSTBUFFER   = 1800,    // Null pointer
  165. CGL_ERR_TEXTURE_INVALID_SIZE,                  // invalid width/height
  166. CGL_ERR_TEXTURE_INVALID_BASEADDR,              // wrong addr
  167. CGL_ERR_TEXTURE_BASEADDR_EXCEED,               // wrong addr
  168.  
  169. // cglUpLoad
  170.  
  171. CGL_ERR_UPLOAD_INVALID_SIZE          =  1900,   // invalid buffer size
  172. CGL_ERR_UPLOAD_HOSTBUFFER,                      // invalid host buffer
  173. CGL_ERR_UPLOAD_STENCIL_NOT_AVAILABLE,           // no stencil buffer
  174. CGL_ERR_UPLOAD_DEPTH_NOT_AVAILABLE,              // no depth buffer
  175.  
  176. // cglDownLoad
  177.  
  178. CGL_ERR_DOWNLOAD_INVALID_SIZE        =  2000,    // invalid buffer size
  179. CGL_ERR_DOWNLOAD_HOSTBUFFER,                     // invalid host buffer
  180. CGL_ERR_DOWNLOAD_STENCIL_NOT_AVAILABLE,          // no stencil buffer
  181. CGL_ERR_DOWNLOAD_DEPTH_NOT_AVAILABLE,            // no depth buffer
  182. CGL_ERR_DOWNLOAD_INVALID_OPERATION,              // invalid operation
  183.  
  184. // cglLockBuffer
  185.  
  186. CGL_ERR_INVALID_BUFFER_TYPE          =  2100,
  187.  
  188. // cglGetPickResult & cglGetExtentResult
  189.                                                                
  190. CGL_ERR_NOT_IN_PICK_MODE             =  3000,  
  191. CGL_ERR_NOT_IN_EXTENT_MODE,
  192. CGL_ERR_QUERY_MEMORY_NO_ENOUGH,
  193. CGL_ERR_UNKNOWN_REVISION,
  194. CGL_ERR_UNKNOWN_IN_HARDWARE, 
  195. CGL_ERR_UNABLE_TO_GET_MAX_COLOR,
  196.  
  197. CGL_ERR_UNKNOWN_GLHW                 = 31999,    // Unknown Hardware Error Detected
  198.  
  199. // Common Error
  200.  
  201. CGL_ERR_MUST_INIT_SCREEN             = 32000,    // First must call cglInitScreen
  202.  
  203. };
  204.  
  205. #endif // __CGL_ERR__
  206.